<template>
  <div class="mostplay">
    <ul class="cont_tab">
      <li v-for="(item,index) in mostnewlist">
        <div class="cont">
          <div class="con_left">
            <img :src="item.images" alt="">
          </div>
          <div class="con_right">
            <h2>{{item.title}}</h2>
            <span>{{item.des}}</span>
            <p>
                <span class="span_left">
                  <svg class="icon" aria-hidden="true">
                    <use xlink:href="#icon-sound-wave"></use>
                  </svg>
                  {{item.comment}}
                </span>
              <span class="span_right">
                  <svg class="icon" aria-hidden="true">
                    <use xlink:href="#icon-listen"></use>
                  </svg>
                  {{item.listen}}
                </span>
            </p>
          </div>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
  export default {
    // name: "mostnew"
    data(){
      return{
        mostnewlist:[]
      }
    },
    mounted() {
      var _this=this;
      this.$http.get('./data/zonghe.json')
        .then((response)=>{
          //成功之后的
          // console.log(response);
          this.mostnewlist=response.data.mostnewlist;
          // console.log(response.data);
          console.log(this.mostnewlist);
        })
        .catch(function (err) {
          //失败的
          console.log(err);
        })
        .then(function () {
          //总会执行的
          //always executed
        })
    }
  }
</script>

<style scoped>
  /*内容*/
  .cont_tab{
    /*background: purple;*/
    padding: 0 20px;
  }
  .cont_tab>li{
    /*margin-top: 30px;*/
  }
  .cont_tab>li:nth-of-type(1){
    margin-top: 0;
  }
  /*li的内容*/
  .cont{
    display: flex;
    /*background-color: palevioletred;*/
    margin-bottom: 10px;
    /*margin-top: 20px;*/
  }
  .con_left{
    width: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background-color: #fa2800;*/
  }
  .con_left img{
    width: 100%;
    border-radius: 4px;
  }
  .con_right{
    /*border:1px solid blue;*/
    width: 66%;
    padding: 10px 0px 10px 10px
  }
  .con_right>h2{
    color: #333;
    font-size: 16px;
    line-height: 1.38;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .con_right>span{
    font-size: 13px;
    color: #999;
    line-height: 1.38;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
  }
  .con_right>p{
    margin: 10px 0;
  }
  .con_right>p>span{
    font-size: 12px;
    color: #999;
  }
  .span_right{
    margin-left: 20px;
  }

</style>
